package com.yc.api.d1104;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import swing2swt.layout.BorderLayout;

public class LayoutWin6 {

	protected Shell shell;
	private Label label;
	private Label label_1;
	private Label label_2;
	private Label label_3;
	private Button button;

	/**
	 * Launch the application.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			LayoutWin6 window = new LayoutWin6();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shell = new Shell();
		shell.setSize(450, 300);
		shell.setText("SWT Application");
		shell.setLayout(new BorderLayout(0, 0));
		
		label = new Label(shell, SWT.NONE);
		label.setLayoutData(BorderLayout.NORTH);
		label.setText("\u4E0A");
		
		label_1 = new Label(shell, SWT.NONE);
		label_1.setLayoutData(BorderLayout.SOUTH);
		label_1.setText("\u4E0B");
		
		label_2 = new Label(shell, SWT.NONE);
		label_2.setLayoutData(BorderLayout.WEST);
		label_2.setText("\u5DE6");
		
		label_3 = new Label(shell, SWT.NONE);
		label_3.setLayoutData(BorderLayout.EAST);
		label_3.setText("\u53F3");
		
		button = new Button(shell, SWT.NONE);
		button.setLayoutData(BorderLayout.CENTER);
		button.setText("\u4E2D");

	}

}
